<?php /* Smarty version 2.6.26, created on 2013-04-03 06:58:46
         compiled from ../templates/user_index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'U', '../templates/user_index.html', 53, false),array('function', 'html_options', '../templates/user_index.html', 75, false),)), $this); ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>コントロールパネル</title>
    
    <link href="./assets/styles/default.css" rel="stylesheet" />
	<script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
	<script src="./assets/scripts/import.js" type="text/javascript"></script>
		<script type="text/javascript">
		$(function() {
			$('.message').fadeIn("slow");
			$('.text_date').datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'yy/mm/dd'
			});
			$('#btn-export').click(function(){	
				if(confirm('ダウンロードしますか？')){
					document.form1.csv.value="download";
					document.form1.submit();
					
				}
			});
			$('#btn-reset').click(function(){	
				location.href = document.form1.action;
			});
			
			$('#btn_search').click(function(){	
				document.form1.csv.value="";
				document.form1.submit();
			});
		});
	
		function toPage(thepage) {
			document.form1.page.value =  thepage;
			document.form1.csv.value="";
			document.form1.submit();
		}

      
		</script>
</head>
<body>
<?php echo $this->_tpl_vars['zhead']; ?>

<div id="container">
<?php echo $this->_tpl_vars['zmenu']; ?>

    
    <article>
    	<h2><span>&nbsp;</span>会員管理<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
		<li class="active"><a href="<?php echo ((is_array($_tmp='Home/User/index')) ? $this->_run_mod_handler('U', true, $_tmp) : U($_tmp)); ?>
"><span>会員検索</span></a></li>
		<li><a href="<?php echo ((is_array($_tmp='Home/User/regist')) ? $this->_run_mod_handler('U', true, $_tmp) : U($_tmp)); ?>
"><span>会員登録</span></a></li>
		</ul>
        </nav>
        
        <section id="content">
        
        	<h3>会員検索検</h3>
			
			<div id="search_form">
				<form name="form1" id="form1" method="get" action="<?php echo ((is_array($_tmp='Home/User/search')) ? $this->_run_mod_handler('U', true, $_tmp) : U($_tmp)); ?>
">
					<input type="hidden" name="page" />
					<dl>
						<dt>フリーワード</dt>
						<dd>
							<input type="text" name="free_word" value="<?php echo $this->_tpl_vars['forms']['free_word']; ?>
" />
						</dd>
					</dl>	
					<dl>
						<dt>都道府県</dt>
						<dd>
						<select name="local_cd">
	                       <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['dao_local'],'selected' => $this->_tpl_vars['forms']['local_cd']), $this);?>

                        </select>

						</dd>
					</dl>
					<dl>
						<dt>状態</dt>
						<dd>
							<label><input type="checkbox" name="state1" <?php if ($this->_tpl_vars['state1'] == 2): ?>checked="true"<?php endif; ?> <?php echo $this->_tpl_vars['forms']['state1']; ?>
  value="2" />仮登録</label>
							<label><input type="checkbox" name="state2" <?php if ($this->_tpl_vars['state2'] == 1): ?>checked="true"<?php endif; ?>  <?php echo $this->_tpl_vars['forms']['state2']; ?>
  value="1" />公開</label>
							<label><input type="checkbox" name="state3" <?php if ($this->_tpl_vars['state3'] == 3): ?>checked="true"<?php endif; ?> <?php echo $this->_tpl_vars['forms']['state3']; ?>
  value="3" />非公開</label>
						</dd>
					</dl>
					<dl>
						<dt>更新日時</dt>
						<dd>
							<input type="text" name="data1" class="text_date" value="<?php echo $this->_tpl_vars['forms']['data1']; ?>
" /> ～ 
							<input type="text" name="data2" class="text_date" value="<?php echo $this->_tpl_vars['forms']['data2']; ?>
" />
						</dd>
					</dl>
					<dl>
						<dt>メルマガ</dt>
						<dd>
							<label><input type="checkbox" name="send1" <?php if ($this->_tpl_vars['send1'] == 1): ?>checked="true"<?php endif; ?> <?php echo $this->_tpl_vars['forms']['send1']; ?>
  value="1" />購読する</label>
							<label><input type="checkbox" name="send2" <?php if ($this->_tpl_vars['send2'] == 2): ?>checked="false"<?php endif; ?> <?php echo $this->_tpl_vars['forms']['send2']; ?>
  value="2" />購読しない</label>
						</dd>
					</dl>
					<p class="search_submit">
						<button type="button" class="submit" id="btn_search"><span>検索</span></button>
				<input type="hidden" name="search" value="1" />
				<input type="hidden" name="csv" />
					</p>
				</form>
			</div>
			
			<?php if (! $this->_tpl_vars['is_showlist']): ?>
			<p class="message"><?php if ($this->_tpl_vars['page']['cnt'] > 0): ?><?php echo $this->_tpl_vars['page']['cnt']; ?>
件登録されています。<?php else: ?>見つかりませんでした。<?php endif; ?></p>

			<p class="btn_dl float-right">
				<a href="javascript:;" id="btn-export">
					CSVダウンロード
				</a>
			</p>

			<table id="search_result" class="sortable">
				<thead>
					<tr>
						<th>状態</th>
						<th>ID</th>
						<th>会員氏名</th>
						<th>貴医院名・<br />貴技工所名</th>
						<th>都道府県</th>
						<th>電話番号</th>
						<th>E-Mail</th>
						<th>参照</th>
						<th>更新</th>
					</tr>
		
				</thead>
				<tbody>
				<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
					<tr>
						<td><?php if ($this->_tpl_vars['v']['state'] == '1'): ?>通常<?php elseif ($this->_tpl_vars['v']['state'] == '2'): ?>仮登録 <?php else: ?>退会 <?php endif; ?></td>
						<td><?php echo $this->_tpl_vars['v']['id']; ?>
</td>
						<td><?php echo $this->_tpl_vars['v']['user_name1']; ?>
&nbsp;<?php echo $this->_tpl_vars['v']['user_name2']; ?>
</td>
						<td><?php echo $this->_tpl_vars['v']['workshop_name']; ?>
</td>
						<td><?php echo $this->_tpl_vars['v']['local_name']; ?>
</td>
						<td><?php echo $this->_tpl_vars['v']['tel_number']; ?>
</td>
						<td><a href="mailto:<?php echo $this->_tpl_vars['v']['email']; ?>
"><?php echo $this->_tpl_vars['v']['email']; ?>
</a></td>
						<td class="update"><a href="<?php echo ((is_array($_tmp='Home/User/Refer')) ? $this->_run_mod_handler('U', true, $_tmp) : U($_tmp)); ?>
?id=<?php echo $this->_tpl_vars['v']['id']; ?>
">参照</a><!--<a href="user_refer.php?id=<?php echo $this->_tpl_vars['v']['id']; ?>
">参照</a>--></td>
						<td class="update"><a href="<?php echo ((is_array($_tmp='Home/User/update')) ? $this->_run_mod_handler('U', true, $_tmp) : U($_tmp)); ?>
?id=<?php echo $this->_tpl_vars['v']['id']; ?>
">更新</a><!--<a href="user_form.php?id=<?php echo $this->_tpl_vars['v']['id']; ?>
">更新</a>--></td>
					</tr>
				<?php endforeach; endif; unset($_from); ?>	
				</tbody>
			</table>

			<p class="pageNav">
			  <?php echo $this->_tpl_vars['pageing']; ?>
	
			</p>
			
			<?php endif; ?>
						
        </section>
    </article>
    
</div>

<?php echo $this->_tpl_vars['zfooter']; ?>

</body>
</html>